package com.collect.tanzania.zhiBean.zhiReceive;

import android.text.TextUtils;

import com.collect.tanzania.zhiUtils.StringUtil;

import java.io.Serializable;
import java.math.BigDecimal;

public class ZHIRGroupPerformanceMoneyEntity implements Serializable {
    private String date;
    private String loginName;
    private String leven;
    private String repayAmount;
    private String sysUserId;

    private String startDate;
    private String endDate;

    public String getDate() {
        return StringUtil.safeString(date);
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getLoginName() {
        return StringUtil.safeString(loginName);
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLeven() {
        return StringUtil.safeString(leven);
    }

    public String getLevenDisplayFormat() {
        return getLeven().contains("B+") ? "B3+" : getLeven();
    }

    public void setLeven(String leven) {
        this.leven = leven;
    }

    public String getRepayAmount() {
        return StringUtil.safeString(repayAmount);
    }

    public BigDecimal getRepayAmountBigDecimal() {
        String tempString = getRepayAmount();
        if (TextUtils.isEmpty(tempString)) {
            tempString = "0";
        }
        BigDecimal bigDecimal = new BigDecimal(tempString).stripTrailingZeros();
        return bigDecimal;
    }

    public float getRepayAmountFloat() {
        return StringUtil.numberTothousandFormatterFloat(getRepayAmount());
    }

    public String getRepayAmountFormat() {
        return StringUtil.numberFormatter00(getRepayAmount());
    }

    public void setRepayAmount(String repayAmount) {
        this.repayAmount = repayAmount;
    }

    public String getSysUserId() {
        return StringUtil.safeString(sysUserId);
    }

    public void setSysUserId(String sysUserId) {
        this.sysUserId = sysUserId;
    }

    public String getStartDate() {
        return StringUtil.safeString(startDate);
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return StringUtil.safeString(endDate);
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }
}
